package calculatorModel;

public class TestModel {

	public static void main(String[] args) throws Exception {

		Operation operator = new Operation(new Sum());

		int[] element = new int[2];

		element[0] = 5;
		element[1] = 9;

		int[] results = operator.doIntOperation(element);

		for (int i = 0; i < results.length; i++) {
			System.out.println("" + results[i]);

		}
		
		operator.setOperator(new Diff());



		results = operator.doIntOperation(element);

		for (int i = 0; i < results.length; i++) {
			System.out.println("" + results[i]);

		}
		

		operator.setOperator(new Mult());



		results = operator.doIntOperation(element);

		for (int i = 0; i < results.length; i++) {
			System.out.println("" + results[i]);

		}

		element[1] = 0;
		
		operator.setOperator(new Div());



		results = operator.doIntOperation(element);

		for (int i = 0; i < results.length; i++) {
			System.out.println("" + results[i]);

		}
	}
}
